package me.jiatao.kotlinmall

import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */


// T被声明为out
interface IGeneric<out T> {
    // 省略部分代码

    fun getT(): T
    
    //fun setT(t:T)
}


class ExampleUnitTest {

    private fun setData(item: IGeneric<String>) {
        // 泛型IGeneric的类型实参是Any
        val newItem: IGeneric<Any> = item
    }

    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }
}


